#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "foodsql.h"
#include "recommend.h"
#include <QMainWindow>
#include "loginpage.h"
#include <dia_addfood.h>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

     virtual void keyPressEvent(QKeyEvent *event);//重写一个虚函数，实现按键刷新的美观
private slots:
    void on_exitBtn_clicked();

    void on_btn_simulation_clicked();

    void on_btn_add_clicked();

    void on_btn_clear_clicked();

    void on_btn_delete_clicked();

    void on_btn_update_clicked();

    void on_btn_search_clicked();

signals:
    //void dish_recommend();//定义菜谱推荐的信号
private:
    void updateTable();

private:
    Ui::MainWindow *ui;
    loginPage m_loginPage;//添加登录页的对象
    foodSql *m_ptrFoodSql;
    Dia_AddFood m_diaAddFood;
    recommend m_recommend;
};
#endif // MAINWINDOW_H
